<template>
  <div class="order">
    <!-- 导航栏 -->
    <van-nav-bar
      title="确认订单信息"
      left-arrow
      @click-left="$router.replace('/')"
    />
    <!-- body -->
    <div class="body">
      <div class="header">
        <img src="https://m.ituring.com.cn/img/register-name.1418a7e0.svg" />
        <span>订单已完成</span>
      </div>
      <div class="item">
        <span>总计金额</span>
        <span>{{ id }} 元</span>
      </div>
      <div class="item">
        <span>优惠</span>
        <span>0 元</span>
      </div>
      <div class="item">
        <span>支付金额</span>
        <span class="price">{{ id }} 元</span>
      </div>
      <div class="footer">
        <div class="btn" @click="submit">
          订单已完成
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props:['id'],
  methods:{
    // 提交
    submit(){
      this.$router.replace('/user/order');
    }
  }

};
</script>

<style lang="scss" scoped>
.order {
  position: relative;
  width: 100vw;
  height: 100vh;
  background-color: #fff;
  z-index: 999;
  .van-nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1999;
    padding: 2px 0;
  }
  .body {
    padding: 50px 0;
    .header {
      padding: 20px 15px;
      display: flex;
      align-items: center;
      span {
        margin-left: 5px;
        font-size: 20px;
        line-height: 30px;
        color: var(--book-name-font-black);
      }
    }
    .item {
      display: flex;
      justify-content: space-between;
      font-size: 14px;
      line-height: 20px;
      margin-top: 5px;
      padding: 3px 15px;
      span {
        color: var(--more-font-grey);
        &.price {
          font-size: 20px;
          color: var(--tag-font-orange);
        }
      }
    }
    .footer {
      padding: 15px;
      border-top: 10px solid #eee;
      margin-top: 20px;
      .btn {
        background-color: var(--theme-blue);
        color: #fff;
        font-size: 14px;
        line-height: 20px;
        padding: 10px 2px;
        border-radius: 50px;
        text-align: center;
      }
    }
  }
}
</style>